package shootplane;

/**
 * 敌机类：继承FlyObject 血量、分数
 */
public class Airplane extends FlyObject implements Enemy {
    private int score;

    public Airplane() {
        image = ShootGame.airplaneImg;
        width = image.getWidth();
        height = image.getHeight();
        speed = 4;
        x = (int) (Math.random() * (400 - width));
        y = -height;
        flood = 2;
        score = 10;
    }

    @Override
    public int getScore() {
        return score;
    }

    @Override
    public void move() {
        setY(getY() + getSpeed());
    }

    public int getFlood() {
        return flood;
    }

    public void setFlood(int flood) {
        this.flood = flood;
    }

}
